
<template>
  <section class="bgff p20" style="min-height:100%;">
    <section>
      <el-table :data="tableData" border style="width: 100%">
        <el-table-column prop="name" label="名称" width="180"></el-table-column>
        <el-table-column prop="name" label="别名" width="180"></el-table-column>
        <el-table-column prop="date" label="创建日期"></el-table-column>
        <el-table-column prop="address" label="操作"  width="100"  fixed="right">
          <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
          <el-button type="text" @click="edter(scope.row)" size="small">编辑</el-button>
        </template>
        </el-table-column>
      </el-table>
      
    </section>
  </section>
</template>

<script>
import datajson from '@/assets/data.json'
export default {
  data() {
    return {
      tableData: [
        {
          id:1,
          date: "2019-05-02 15:22:24",
          name: "值班人员1",
          nick: "用户管理1"
        },
        {
          id:2,
          date: "2019-05-04 15:22:24",
          name: "管理人员2",
          nick: "用户管理2"
        },
        {
          id:3,
          date: "2019-05-01 15:22:24",
          name: "调度人员3",
          nick: "用户管理3"
        },
        {
          id:4,
          date: "2019-05-03 15:22:24",
          name: "用户管理4",
          nick: "用户管理4"
        },
        {
          id:5,
          date: "2019-05-01 15:22:24",
          name: "用户管理5",
          nick: "用户管理5"
        },
        {
          id:6,
          date: "2019-05-03 15:22:24",
          name: "用户管理6",
          nick: "用户管理6"
        }
      ],
      dataj:datajson.content
    };
  },
  created(){
    console.log(this.dataj)
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
    handleClick(row){

    },
    edter(row){
      this.$router.push('/auth/add')
      console.log(row)
    }
  }
};
</script>

<style lang="less">
</style>
